<template>
	<view class="formpanel">
		<form @submit="formSubmit">
			<view class="group border-tb">当事人信息</view>
			<view class="cu-form-group border-b hidden">
				<view class="title"><text class="white">*</text>案号</view>
				<view class="text"><input name="Num" placeholder="请输入案号" placeholder-class="gray" :value="Info.Num"></input></view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="white">*</text>当事人类型</view>
				<view class="text">
					<radio-group name="PersonType" @change="PersonTypeChange">
						<label><view class="r1"><radio value="1" :checked="Info.PersonType==1?true:false" color="#3d7dfd" /></view><view class="r2">个人</view></label>
						<label><view class="r1"><radio value="2" :checked="Info.PersonType==2?true:false" color="#3d7dfd" /></view><view class="r2">个体户</view></label>
						<label><view class="r1"><radio value="3" :checked="Info.PersonType==3?true:false" color="#3d7dfd" /></view><view class="r2">企业</view></label>
					</radio-group> 
				</view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="red">*</text>当事人</view>
				<view class="text"><input name="RealName" placeholder="请输入当事人" placeholder-class="gray" :value="Info.RealName"></input></view>
				<!--#ifdef APP-->
				<view class="icon" @click="ScanIdCard" v-if="Info.PersonType==1"><image src="/static/scanren.png" /></view>
				<!--#endif-->
				<!--#ifdef MP-WEIXIN-->
				<ocr-navigator @onSuccess="ScanSuccess" v-if="Info.PersonType==1" certificateType="idCard" :opposite="false" class="icon" data-com-type="wx"><image src="/static/scanren.png" /></ocr-navigator>
				<!--#endif-->
				<view class="icon" @click="ScanBusinessLicense" v-if="Info.PersonType>1"><image src="/static/scancom.png" /></view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="white">*</text>{{Info.PersonType==1?'身份证号':'统一社会信用代码'}}</view>
				<view class="text"><input name="IDCard" :placeholder="Info.PersonType==1?'请输入身份证号':'请输入统一社会信用代码'" placeholder-class="gray" :value="Info.IDCard"></input></view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="white">*</text>{{Info.PersonType==1?'住址':'地址'}}</view>
				<view class="text"><input name="Address" :placeholder="Info.PersonType==1?'请输入住址':'请输入地址'" placeholder-class="gray" :value="Info.Address" @input="AddressInput"></input><input name="Lat" type="text" class="hidden" :value="Info.Lat"></input><input name="Lng" type="text" class="hidden" :value="Info.Lng"></input></view>
				<view class="icon" @click="ChooseAddress(1, Info.Lat, Info.Lng)"><image src="/static/address.png" /></view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="red">*</text>联系电话</view>
				<view class="text"><input name="Mobile" type="number" placeholder="请输入联系电话" placeholder-class="gray" :value="Info.Mobile"></input></view>
			</view>
			<view class="group border-b">案件基本信息</view>
			<view class="cu-form-group border-b">
				<view class="title" ><text class="red">*</text>案由</view>
				<view class="text">
					<selecter :list="EasyCauseActionList" keys="ID" name="Name" :val="Info.EasyCauseActionID" @change="EasyCauseActionChange" searchtip="请输入案由名称搜索"></selecter>
					<input name="EasyCauseActionID" Stage="text" class="hidden" :value="Info.EasyCauseActionID"/>
					<view class="pickermeng">请点击此处选择案由</view>
				</view>
			</view>
			<view class="cu-form-group border-b" v-if="Info.EasyCauseActionID!=0">
				<view class="text">
					<textarea name="EasyCauseActionName" style="with:600rpx; height:80rpx;" maxlength="-1" placeholder="请输入案由名称" placeholder-class="gray" :value="Info.EasyCauseActionName" ></textarea>
				</view>
			</view>
			<view class="cu-form-group border-b" v-if="Info.EasyCauseActionID!=0">
				<view class="text">
					<textarea name="Violated" style="with:600rpx;" maxlength="-1" placeholder="请输入违反内容" placeholder-class="gray" :value="Info.Violated" ></textarea>
				</view>
			</view>
			<view class="cu-form-group border-b" v-if="Info.EasyCauseActionID!=0">
				<view class="text">
					<textarea name="LegalBasis" style="with:600rpx;" maxlength="-1" placeholder="请输入处罚依据" placeholder-class="gray" :value="Info.LegalBasis"></textarea>
				</view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="red">*</text>案发地点</view>
				<view class="text"><input name="AFAddress" placeholder="请输入或选择案发地点" placeholder-class="gray" :value="Info.AFAddress" @input="AFAddressInput"></input><input name="AFLat" type="text" class="hidden" :value="Info.AFLat"></input><input name="AFLng" type="text" class="hidden" :value="Info.AFLng"></input></view>
				<view class="icon" @click="ChooseAddress(2, Info.AFLat, Info.AFLng)"><image src="/static/address.png" /></view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="red">*</text>案发时间</view>
				<view class="text">
					<uni-timepicker fields="minute" placeholder="选择时间" :defaultValue="Info.AFDate" @change="AFDateChange"></uni-timepicker>
					<input name="AFDate" type="text" class="hidden" :value="Info.AFDate"/>
				</view>
			</view>
			<view class="group border-b">责令改正情况</view>
			<radio-group name="CorrectType" style="width:100%;" @change="CorrectTypeChange">
				<view class="cu-form-group border-b">
					<view class="line">
						<label><view class="r1"><radio value="1" :checked="Info.CorrectType==1?true:false" color="#3d7dfd" /></view><view class="r2" style="padding-left:20rpx; padding-top:2rpx;">立即停止违法行为</view></label>
					</view>
				</view>
				<view class="cu-form-group">
					<view class="line" style="height:120rpx; padding-top:16rpx;">
						<label><view class="r1"><radio value="2" :checked="Info.CorrectType==2?true:false" color="#3d7dfd"/></view><view class="r2" style="padding-left:20rpx; padding-top:2rpx;">立即改正违法行为</view></label>
					</view>
				</view>				
				<view class="cu-form-group flex" style="min-height:140rpx; padding-top:16rpx; padding-bottom:24rpx;">
					<view class="line" style="width:440rpx;">
						<label><view class="r1"><radio value="3" :checked="Info.CorrectType==3?true:false" color="#3d7dfd" /></view><view class="r2" style="padding-left:20rpx; padding-top:2rpx;">限期改正违法行为，于</view></label>
					</view>
					<view class="line" style="width:240rpx;">
						<uni-timepicker name="CorrectDate" fields="minute" placeholder="选择时间" :defaultValue="Info.CorrectDate" @change="CorrectDateChange"></uni-timepicker>
						<input name="CorrectDate" type="text" class="hidden" :value="Info.CorrectDate"/>
					</view>
					<view class="line" style="padding-left:65rpx;">前改正，具体改正内容及要求如下：</view>
				</view>
				<view class="cu-form-group border-b" v-if="Info.CorrectType==3">
					<textarea name="CorrectContext" style="with:600rpx; margin-left:65rpx; margin-top:0rpx;" placeholder="请输入具体改正内容及要求" :value="Info.CorrectContext" maxlength="-1" @input="InputCorrectContext"></textarea>
				</view>
			</radio-group>
			<view class="group border-tb">执法人员</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="red">*</text>主办人</view>
				<view class="text">
					<selecter :list="UserList1" keys="RealName" name="RealName" :val="Info.ZBRRealName + (Info.ZBRLawNum == '' ? '' : ('-' + Info.ZBRLawNum))" @change="ZBRRealNameChange" searchtip="请输入姓名搜索"></selecter>
				</view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="red">*</text>协办人</view>
				<view class="text">
					<selecter :list="UserList2" keys="RealName" name="RealName" :val="Info.XBRRealName + (Info.XBRLawNum == '' ? '' : ('-' + Info.XBRLawNum))" @change="XBRRealNameChange" searchtip="请输入姓名搜索"></selecter>
				</view>
			</view>
			<view class="group border-tb">行政机关联系人</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="red"></text>联系人</view>
				<view class="text"><input name="OfficeRealName" type="text" placeholder="请输入行政机关联系人" placeholder-class="gray" :value="Info.OfficeRealName"></input></view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="red"></text>联系电话</view>
				<view class="text"><input name="OfficeMobile" type="text" placeholder="请输入行政机关联系电话" placeholder-class="gray" :value="Info.OfficeMobile"></input></view>
			</view>
			<view class="cu-form-group border-b">
				<view class="title"><text class="red"></text>联系地址</view>
				<view class="text"><input name="OfficeAddress" type="text" placeholder="请输入行政机关联系地址" placeholder-class="gray" :value="Info.OfficeAddress"></input></view>
			</view>
			<view class="group">现场照片 <text class="number">{{OldList.length+ImgList.length}}/9</text></view>
			<view class="imglist">
				<view class="img" v-for="(img,index) in OldList" @click="PrevImg(OldList, index)"><image :src="Tools.GetImg(img,1000)" mode="aspectFill"/><view class="delete" @click="DeleteImg1(index)" @click.stop="" v-if="Info.State==0"><image src="/static/error.png"/></view></view>
				<view class="img" v-for="(img,index) in ImgList" @click="PrevImg(ImgList, index)"><image :src="img" mode="aspectFill"/><view class="delete" @click="DeleteImg2(index)" @click.stop="" v-if="Info.State==0"><image src="/static/error.png"/></view></view>
				<view class="img bd" @click="ChooseImg" v-if="Info.State==0"><image src="/static/addphoto.png" /></view>
			</view>
			<template v-if="ID>0">
			<view class="group">当事人签字 <text class="resign" v-if="Info.State==0 && ID>0 && Info.SignName!=''" @click="SignName">重新签字</text></view>
			<view class="signlist">
				<view class="signname" v-if="Info.State==0 && Info.SignName==''" @click="SignName">点此签字</view>
				<image v-else :src="Tools.GetImg(Info.SignName,500)" mode="aspectFit" @click="SignName"></image>
			</view>
			</template>
			<view class="btn">
				<template v-if="Info.State==0">
					<button class="publishs" form-type="submit">确定</button>					
					<button class="chufa" v-if="ID>0" @click="ChuFa">处罚</button>
					<button class="print" v-if="ID>0" @click="Print">打印</button>
					<button class="jiean" v-if="ID>0" @click="Settle">结案</button>
				</template>
				<button class="deletes" v-if="ID>0 && CanDelete==1" @click="Delete">删除</button>
				<template v-if="Info.State==1">
					<button class="publishs" @click="Print">打印预览</button>
				</template>
			</view>
		</form>
	</view>
</template>

<script>
	//#ifdef APP
	const sealOcrModule = uni.requireNativePlugin('Seal-OCR')
	//#endif
	export default {
		data() {
			return {
				ID:0,
				Info:{ID:0,EasyCauseActionID:0},
				BankName:'',
				BankNum:'',
				RealName:'',
				IDCard:'',
				Count:0,
				EasyPrint:'',
				Chapter:'',
				CanDelete:0,
				EasyCauseActionID:0,
				EasyCauseActionList:[{ID:0,Name:'请选择案由'}],
				UserList1:[{ID:0,RealName:"请选择主办人"}],
				UserList2:[{ID:0,RealName:"请选择协办人"}],
				OldList:[],
				ImgList:[]
			};
		},
		onShow() {
			this.Count++;
				if(this.Count>=2){
				setTimeout(()=>{
					this.Util.HideLoading();
				},3000);
			}
		},
		onLoad(options) {
			//uni.setStorageSync("Token","669a8e27d9e84380af844f49bf6f2e80");
			//监听生成签字的图片地址
			uni.$on('q-sign',path =>{
				this.Util.Loading("请稍候...");
				this.Util.OneUpload(path,"upload_file_signname",img=>{
					this.Info.SignName=img;
					this.SaveSignName(img);
				});
			})
			this.ID=options.ID;
			this.RealName=options.RealName;
			this.IDCard=options.IDCard;
			this.Find_EasyInfo();
		},
		onUnload() {
			uni.$off('q-sign') //移除监听事件
		},
		methods:{
			AFDateChange(e){
				this.Info.AFDate = e.f3;
			},
			CorrectDateChange(e){
				this.Info.CorrectDate = e.f3;
			},
			Print(){ 
				uni.navigateTo({
					url:'zegaiprint_'+this.EasyPrint+'?ID='+this.ID
				});
			},
			Cancel(){
				this.$refs.popup.close();
			},
			InputCorrectContext(e){
				this.Info.CorrectContext = e.detail.value;
			},
			AddressInput(e){
				this.Info.Address = e.detail.value;
			},
			AFAddressInput(e){
				this.Info.AFAddress = e.detail.value;
			},
			PersonTypeChange(e){
				this.Info.PersonType = parseInt(e.detail.value);
			},
			CorrectTypeChange(e){
				this.Info.CorrectType = parseInt(e.detail.value);
			},
			EasyCauseActionChange(index){
				setTimeout(item=>{
					this.EasyCauseAction = this.EasyCauseActionList[index];
					this.Info.EasyCauseActionID=this.EasyCauseAction.ID;
					this.Info.EasyCauseActionName=this.EasyCauseAction.Name;
					this.Info.Violated=this.EasyCauseAction.Violated;
					this.Info.LegalBasis=this.EasyCauseAction.LegalBasis;
				},500);				
			},
			ZBRRealNameChange(index){
				this.Info.ZBRRealName=this.UserList1[index].RealName;
				this.Info.ZBRLawNum=this.UserList1[index].LawNum;
			},
			XBRRealNameChange(index){
				this.Info.XBRRealName=this.UserList2[index].RealName;
				this.Info.XBRLawNum=this.UserList2[index].LawNum;
			},
			PunishTypeChange(e){
				this.Info.PunishType=e.detail.value;
			},
			ScanSuccess(res){
				this.Info.RealName = res.detail.name.text;
				this.Info.IDCard = res.detail.id.text;
				this.Util.Toast("识别成功");
			},
			ScanIdCard(){
				this.Count++;
				setTimeout(()=>{
					this.Util.Loading("识别中...");
				},1000);
				sealOcrModule.ocr({ocrType: 'idcard_front',albumEnable: false}, res => {					
						this.Info.RealName = res.ocrResult.name.words;
						this.Info.IDCard = res.ocrResult.idNumber.words;
						//this.Info.Address = res.ocrResult.address.words;
						this.Util.HideLoading();
						this.Util.Toast("识别成功");
				    }
				);
				/* 自己平台处理
				uni.chooseImage({
				    count: 1, //默认9
				    sizeType: ['compressed'], //可以指定是原图还是压缩图，默认二者都有
				    sourceType: ['camera'], //从相册选择
				    success: res=> {
						var ImgList = res.tempFilePaths;
						this.Util.Loading("识别中...");
						this.Util.ScanUpload(ImgList[0],"upload_file_x",json=>{
							this.Util.HideLoading();
							this.Info.RealName=json.RealName;
							if(this.Info.PersonType==1){
								this.Info.IDCard=json.IdCard;
							}
							this.Util.Toast("识别成功");
						});
				    }
				});
				*/
			},
			ScanBusinessLicense(){
				uni.chooseImage({
				    count: 1, //默认9
				    sizeType: ['compressed'], //可以指定是原图还是压缩图，默认二者都有
				    sourceType: ['camera','album'], //从相册选择
				    success: res=> {
						var ImgList = res.tempFilePaths;
						this.Util.Loading("识别中...");
						this.Util.ScanUpload(ImgList[0],"upload_file_b",json=>{
							this.Util.HideLoading();
							if(this.Info.RealName==""){
								this.Info.RealName=json.ComName;
							}
							if(this.Info.IDCard==""){
								this.Info.IDCard=json.CreditCode;
							}
							if(this.Info.Address==""){
								this.Info.Address=json.ComAddress;
							}
							this.Util.Toast("识别成功");
						});
				    }
				});
			},
			ChooseAddress(Flag, Lat, Lng){
				//#ifdef APP
				uni.getLocation({
					type: 'gcj02',
					success: curr=> {
						uni.chooseLocation({
							latitude: Lat == 0 ? curr.latitude : Lat,
							longitude:Lng == 0 ? curr.longitude : Lng,
							success: res=> { 
								if(Flag==1){
									this.Info.Lat=res.latitude;
									this.Info.Lng=res.longitude;
									this.Info.Address=res.address.replace(res.name,'')+res.name;
								}else{
									this.Info.AFLat=res.latitude;
									this.Info.AFLng=res.longitude;
									this.Info.AFAddress=res.address.replace(res.name,'')+res.name;
								}
							},fail(res) {
								console.log(res);
							}
						});
					}
				});
				//#endif
				//#ifdef MP-WEIXIN
				uni.chooseLocation({
					latitude: Lat == 0 ? undefined : Lat,
					longitude:Lng == 0 ? undefined : Lng,
					success: res=> {
						if(Flag==1){
							this.Info.Lat=res.latitude;
							this.Info.Lng=res.longitude;
							this.Info.Address=res.address.replace(res.name,'')+res.name;
						}else{
							this.Info.AFLat=res.latitude;
							this.Info.AFLng=res.longitude;
							this.Info.AFAddress=res.address.replace(res.name,'')+res.name;
						}
					},fail(res) {
						console.log(res);
					}
				});
				//#endif
			},
			ChooseImg() {
				uni.chooseImage({
					count: 9, // 默认9
					sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
					sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
					success: res=> {
						var ImgList=[];
						res.tempFilePaths.forEach(item=>{
							ImgList.push(item);
						});
						this.ImgList = this.ImgList.concat(ImgList);
					}
				});
			},
			PrevImg(ImgList, Index){
				uni.previewImage({
				  current: ImgList[Index], // 当前显示图片的http链接
				  urls: ImgList // 需要预览的图片http链接列表
				});
			},
			DeleteImg1(index){
				const self = this
				this.Util.Confirm("您确定要删除吗？",item=>{
					self.OldList.splice(index,1)
				});
			},
			DeleteImg2(index){
				const self = this
				this.Util.Confirm("您确定要删除吗？",item=>{
					self.ImgList.splice(index,1)
				});
			},
			Find_EasyInfo(callback){
				var data = {};
				data.ID=this.ID;
				data.Act="Find_EasyInfo";
				data.Type=1;
				this.Util.Loading("加载中...");
				this.Util.Post(data, json=>{
					this.Util.HideLoading();
					uni.stopPullDownRefresh();
					uni.hideNavigationBarLoading();
					this.Info = json.Data.Info;
					this.BankName=json.Data.BankName;
					this.BankNum=json.Data.BankNum;
					this.EasyPrint=json.Data.EasyPrint;
					this.Chapter = json.Data.Chapter;
					this.CanDelete = json.Data.CanDelete;
					this.EasyCauseActionList = this.EasyCauseActionList.concat(json.Data.EasyCauseActionList);
					this.UserList1= this.UserList1.concat(json.Data.UserList);
					this.UserList2= this.UserList2.concat(json.Data.UserList);
					if(this.Info.Imgs.Trim()!=''){
						this.OldList=this.Info.Imgs.split(',');
					}
					if(this.RealName){
						this.Info.RealName=this.RealName;
					}
					if(this.IDCard){
						this.Info.IDCard=this.IDCard;
					}
					if(this.ID==0){
						this.Info.ZBRRealName=uni.getStorageSync("ZBRRealName");
						this.Info.XBRRealName=uni.getStorageSync("XBRRealName");
						this.Info.ZBRLawNum=uni.getStorageSync("ZBRLawNum");
						this.Info.XBRLawNum=uni.getStorageSync("XBRLawNum");
					}
					if(callback){
						callback();
					}
				});
			},
			formSubmit(e){
				var data = e.detail.value;
				data.Act="Save_Easy";
				data.ID=this.ID;
				data.Type=1;
				data.ZBRRealName = this.Info.ZBRRealName.replace("请选择主办人","");
				data.XBRRealName = this.Info.XBRRealName.replace("请选择协办人","");
				data.ZBRLawNum = this.Info.ZBRLawNum;
				data.XBRLawNum = this.Info.XBRLawNum;
				uni.setStorageSync("ZBRRealName",data.ZBRRealName);
				uni.setStorageSync("XBRRealName",data.XBRRealName);
				uni.setStorageSync("ZBRLawNum",data.ZBRLawNum);
				uni.setStorageSync("XBRLawNum",data.XBRLawNum);
				if(data.RealName.Trim()==""){
					this.Util.Toast("请输入当事人");
					return;
				}
				/*
				if(data.PersonType=="1" && data.IDCard.Trim()==""){
					this.Util.Toast("请输入身份证号");
					return;
				}
				if(data.PersonType!="1" && data.IDCard.Trim()==""){
					this.Util.Toast("请输入统一社会信用代码");
					return;
				}
				*/
				if(data.Mobile.Trim()==""){
					this.Util.Toast("请输入当事人联系电话");
					return;
				}
				if(data.EasyCauseActionID==0){
					this.Util.Toast("请选择案由");
					return;
				}
				if(data.AFAddress.Trim()==""){
					this.Util.Toast("请输入或选择案发地点");
					return;
				}
				if(data.AFDate.Trim()==""){
					this.Util.Toast("请选择案发时间");
					return;
				}
				if (data.CorrectType == 3 && data.CorrectDate == '')
				{
					this.Util.Toast("请选择限期改正时间");
					return;
				}
				if (data.CorrectType == 3 && data.CorrectContext == "")
				{
					this.Util.Toast("请输入具体改正内容");
					return;
				}
				if(data.ZBRRealName.Trim()==""){
					this.Util.Toast("请选择主办人");
					return;
				}
				if(data.XBRRealName.Trim()==""){
					this.Util.Toast("请选择协办人");
					return;
				}
				if(this.ImgList.length==0 && this.Info.Imgs==''){
					this.Util.Toast("请上传现场照片");
					return;
				}
				this.Util.Loading("请稍候...");
				if(this.ImgList.length>0){
					var ImgList=this.Util.TranList(this.ImgList).reverse();
					this.Util.Upload(ImgList,"upload_file_o",[],list=>{
						data.Imgs = this.OldList.concat(list).join(",");
						this.Save(data);
					});
				}else{
					data.Imgs = this.OldList.join(",");
					this.Save(data);
				}
			},
			Save(data){
				this.Util.Post(data, json=>{
					this.Util.HideLoading();
					if(json.State){
						this.ID=json.Data.Info.ID;
						this.ImgList=[];						
						this.Util.Toast(json.Msg, obj=>{
							uni.$emit("Success","");
							this.Find_EasyInfo(()=>{
								if(this.Info.SignName==''){
									setTimeout(()=>{
										uni.pageScrollTo({
									　　　　duration: 200,// 过渡时间
									　　　　selector: '.signlist',// 滚动的实际距离
									　　});
									},100);
								}
							});
						});
					}else{
						this.Util.Alert(json.Msg);
					}
				});
			},
			SaveSignName(SignName){
				var data={};
				data.Act="Save_SignName";
				data.ID=this.ID;
				data.SignName=SignName;
				this.Util.Post(data, json=>{
					this.Util.HideLoading();
					if(json.State){
						this.Util.Toast(json.Msg);
					}else{
						this.Util.Alert(json.Msg);
					}
				});
			},
			ChuFa(){
				uni.navigateTo({
					url:'chufaadd?From=zegai&ID='+this.ID
				})
			},
			SignName(){
				// uni.navigateTo({
				// 	url:'signname'
				// })
				if(this.Info.State==0){
					uni.navigateTo({
						url:'/uni_modules/q-sign/q-sign'
					})
				}
			},
			Settle(){
				this.Util.Confirm("是否确定结案？",res=>{
					var data = {};
					data.Act="Settle_Easy";
					data.ID=this.ID;
					this.Util.Loading("请稍候...");
					this.Util.Post(data, json=>{
						this.Util.HideLoading();
						if(json.State){
							this.Util.Toast(json.Msg, obj=>{
								uni.$emit("Success");
								//uni.navigateBack();
								this.Find_EasyInfo();
							});
						}else{
							this.Util.Alert(json.Msg);
						}
					});
				});
			},
			Delete(){
				this.Util.Confirm("是否确定删除？",res=>{
					var data = {};
					data.Act="Delete_Easy";
					data.ID=this.ID;
					this.Util.Loading("请稍候...");
					this.Util.Post(data, json=>{
						this.Util.HideLoading();
						if(json.State){
							this.Util.Toast(json.Msg, obj=>{
								uni.$emit("Success");
								uni.navigateBack();
							});
						}else{
							this.Util.Alert(json.Msg);
						}
					});
				});
			}
		}
	}
</script>

<style lang="scss">
	.group{width:100%; height:80rpx; line-height: 80rpx; padding-left:30rpx; font-size:32rpx; margin-top:25rpx; color:#3d7dfd; background-color: #ffffff;
		.number{color:#000000; padding-right:30rpx; float:right;}
		.resign{color:#00c1a8; padding-right:30rpx; float:right;}
	}
	label{width:auto; margin-right: 20rpx; display: flex; flex-direction: row; .r1{margin-top:-2rpx;} .r2{margin-top:0rpx; line-height: 50rpx; font-size:34rpx;}}
	label:last-child{margin-right: 0rpx;} 
	radio{transform:scale(0.8);}
	.icon{width:60rpx; height:100rpx; image{border-radius:0rpx; width:60rpx; height: 60rpx; margin-top:20rpx;}}
	.flex{display: flex; flex-direction: row; flex-wrap: wrap;}
	.line{font-size:34rpx; .datatime{color:#a9a8a8 !important;}}
	.imglist{width:100%; height:auto; padding-bottom: 20rpx; padding-left:30rpx; background-color: #ffffff; display: flex; flex-direction: row; flex-wrap: wrap;
		.img{width:150rpx; height:150rpx; position: relative; margin-left:30rpx; margin-bottom:20rpx;
			.delete{width:40rpx; height:40rpx; position:absolute; right:-15rpx; top:-15rpx;}
			image{width:100%; height: 100%; border-radius: 0rpx;}
		}
		.img:nth-child(4n-3){margin-left:0rpx;}
		
		.bd{border:1rpx solid #bfbfbf;}
	}
	.signlist{width:100%; height:auto; position: relative; overflow:hidden; padding-bottom: 20rpx; padding-left:10rpx; background-color: #ffffff;
		image{width:500rpx; height:200rpx;}
	}
	.print{width:140rpx; height:100rpx; line-height: 100rpx; background-color: #80c12a; border:0rpx; border-radius: 0rpx; text-align: center; color:#ffffff; font-size:34rpx;}
	.deletes{width:140rpx; height:100rpx; line-height: 100rpx; background-color: #f41332; border:0rpx; border-radius: 0rpx; text-align: center; color:#ffffff; font-size:34rpx;}
	.chufa{width:140rpx; height:100rpx; line-height: 100rpx; background-color: #0181fe; border:0rpx; border-radius: 0rpx; text-align: center; color:#ffffff; font-size:34rpx;}
	.jiean{width:140rpx; height:100rpx; line-height: 100rpx; background-color: #f3740f; border:0rpx; border-radius: 0rpx; text-align: center; color:#ffffff; font-size:34rpx;}
	.signname{width:100%; height:150rpx; line-height: 100rpx; border:0rpx; border-radius: 0rpx; text-align: center; color:#a8a8a8; font-size:40rpx;}
	.sheetmenu{width:100%; height:100rpx; line-height: 100rpx; text-align: center; font-size:34rpx; color:#808080;}
	.sheetmenu:active{background-color: #e8e7e7;}
	.gray,input{color:#a9a8a8 !important;}
	.signclass{transform: rotate(-90deg);}
</style>
